<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数防抖</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore.js"></script>

    <style>
        #container{
            height: 200px;
            background: #000;
            color: white;
            text-align: center;
            line-height: 200px;
            font-size: 25px;
            font-weight: bold;
        }
    </style>
</head>
<body>
<div id="container"></div>
<script src="debounce.js"></script>
<script src="index.js"></script>
<script>
    //防抖
    //应用场景
    //1、输入框搜索查询
    //2、表单进行校验
    //3、按钮提交防重复点击
    //4、窗口缩放 resize事件
    //5、scroll 事件

    //节流应用场景
    //1、DOM元素的拖拽
    //2、射击游戏
    //3、计算鼠标移动距离
    //4、监听scroll滚动事件
</script>
</body>
</html>
